package com.jrx.anytxn.param.job.bactchlimitadjust.step;

import com.jrx.anytxn.param.entity.BtLimitAdjustInfo;
import com.jrx.anytxn.param.mapper.ext.ExtBtLimitAdjustInfoMapper;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 批量调额writer
 *
 * @author : zhenghaopu
 * 2020/1/6
 */
@Service
public class BatchLimitAdjustStep2Writer implements ItemWriter<BtLimitAdjustInfo> {

    @Resource
    private ExtBtLimitAdjustInfoMapper extBtLimitAdjustInfoMapper;

    @Override
    public void write(List<? extends BtLimitAdjustInfo> items) throws Exception {
        extBtLimitAdjustInfoMapper.batchUpdateForBatch((List<BtLimitAdjustInfo>)items);
    }
}
